#include "factory.h"
#include <servo.h>
#include <well.h>
#include <inexbot.h>
#include <nowio.h>
#include <iostream>
Factory::Factory() { }

Factory::~Factory() { }

std::shared_ptr<Slave> Factory::CreateSlave(EcType type) {
    switch (type)
    {
    case EC_IO:
        return std::make_shared<EcIO>();
    case EC_WELL_DIGITAL_IO:
        return std::make_shared<WellIO>();
    case EC_INEXBOT_IO:
        return std::make_shared<InexBotIO>();
    case EC_SERVO:
        return std::make_shared<Servo>();
    case EC_NOWIO:
    	return std::make_shared<NowIO>();
    default:
        break;
    }
    return std::make_shared<Slave>();
}
